program Project1;

{$APPTYPE CONSOLE}
{$R+;Q+}

uses
  SysUtils;

type
  tvector = record
    x, y : extended;
  end;

var
  point : array[1..1000] of tvector;
  n, i, l, r, m, sign : integer;
  point1 : tvector;

function len(p1, p2 : tvector) : extended;
begin
  result := (p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y);
end;

function tovector(p1, p2 : tvector) : tvector;
begin
  result.x := p2.x - p1.x;
  result.y := p2.y - p1.y;
end;

function cross(v1, v2 : tvector) : extended;
begin
  result := v1.x * v2.y - v2.x * v1.y;
end;

begin
  reset(input, 'input.txt');
  rewrite(output, 'output.txt');

  read(n);
  for i := 1 to n do
    read(point[i].x, point[i].y);
  point[n + 1] := point[1];  
  read(point1.x, point1.y);
      
  if cross(tovector(point[1], point[2]), tovector(point[1], point[n])) < 0 then
    sign := -1
  else
    sign := 1;

  l := 1;
  r := n + 1;
  while r - l > 1 do begin
    m := (r + l) div 2;
    if sign * cross(tovector(point[1], point[m]), tovector(point[1], point1)) >= 0 then
      l := m
    else
      r := m;
  end;

  if (sign * cross(tovector(point[1], point[l]), tovector(point[1], point1)) <> 0) then begin
    if (sign * cross(tovector(point[1], point[l]), tovector(point[1], point1)) >= 0) and
       (sign * cross(tovector(point[l], point[l + 1]), tovector(point[l], point1)) >= 0) and
       (sign * cross(tovector(point[1], point[l + 1]), tovector(point[1], point1)) <= 0) then
         writeln('Yes')
       else
         writeln('No');
   end else begin
     if len(point[1], point[l]) >= len(point[1], point1) then
       writeln('Yes')
     else
       writeln('No');  
   end;

end.
